load("@rules_java//java:defs.bzl", "java_library")
load("//:testing.bzl", "junit4_test_suites")

package(default_applicable_licenses = [
    "//:license",
])

java_library(
    name = "tests",
    testonly = True,
    srcs = glob(["*.java"]),
    deps = [
        "//:java_truth",
        "//common:cel_ast",
        "//common:cel_descriptors",
        "//common:cel_source",
        "//common:compiler_common",
        "//common:container",
        "//common:options",
        "//common:proto_ast",
        "//common:proto_json_adapter",
        "//common:proto_v1alpha1_ast",
        "//common:source_location",
        "//common/ast",
        "//common/internal",
        "//common/types",
        "//common/types:cel_proto_types",
        "//common/types:cel_v1alpha1_types",
        "//common/values:cel_byte_string",
        "//compiler",
        "//compiler:compiler_builder",
        "//parser:macro",
        "@cel_spec//proto/cel/expr:checked_java_proto",
        "@cel_spec//proto/cel/expr:syntax_java_proto",
        "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto",
        "@com_google_googleapis//google/api/expr/v1alpha1:expr_java_proto",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_guava_guava_testlib",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_testparameterinjector_test_parameter_injector",
        "@maven//:com_google_truth_extensions_truth_proto_extension",
        "@maven//:junit_junit",
        "@maven//:org_antlr_antlr4_runtime",
    ],
)

junit4_test_suites(
    name = "test_suites",
    sizes = [
        "small",
    ],
    src_dir = "src/test/java",
    deps = [
        ":tests",
    ],
)
